using System;
using System.Collections.Generic;
using System.Text;
using SharksHunter.Domain.Model;

namespace SharksHunter.Domain.Test.Factory
{
    public static class CollectionFactory
    {
        private static long size1 = 312;
        private static long size2 = 112;
        private static long size3 = 182;
        public static long CollectionSize = size1 + size2 + size3;


        public static SharksHunter.Domain.Model.Collection CreateCollection()
        {
            Collection col = new Collection();
            col.Name = "Collection Test";
            col.Description = "For test purpose only";
            col.Path = System.IO.Directory.GetCurrentDirectory();

            col.CollectionIncomingFolders.Add(new IncomingFolder("c:\\windows"));
            
            Entity e1 = new Entity("Test Entity 1");
            col.Entities.Add(e1);

            Entity e2 = new Entity("Test Entity 2");
            col.Entities.Add(e2);
            e2.EntityIncomingFolders.Add(new IncomingFolder("c:\\program files"));

            Shot s11 = new Shot();
            s11.Name = "Test Shot for Entity 1";
            e1.Shots.Add(s11);

            Shot s12 = new Shot();
            s12.Name = "Test Shot for Entity 1";
            e1.Shots.Add(s12);

            Shot s21 = new Shot();
            s21.Name = "Test Shot for Entity 2";
            e2.Shots.Add(s21);

            Item i111 = new Item();
            i111.Name = "Test Item for Shot 11";
            i111.Size = size1;
            s11.Items.Add(i111);

            Item i112 = new Item();
            i112.Name = "Test Item for Shot 11";
            i112.Size = size2;
            s11.Items.Add(i112);

            Item i212 = new Item();
            i212.Name = "Test Item for Shot 21";
            i212.Size = size3;
            s11.Items.Add(i212);

            return col;
        }
    }
}
